<!--https://tailwindcomponents.com/component/login-page-glass-effect-and-background-image-->
<template>
  <v-parallax
      class="flex h-screen w-full items-center justify-center bg-gray-900 bg-cover bg-no-repeat"
      :src="item"
    >
      <v-sheet
        class="mx-auto bg-cyan-600"
        elevation="8"
        max-width="1000"
      >
        <v-slide-group
          v-model="model"
          class="pa-4"
          selected-class="bg-primary"
          show-arrows
          center-active
        >
          <v-slide-group-item
            v-for="n in slides"
            :key="n"
            v-slot="{ isSelected, toggle, selectedClass }"
          >
            <v-card
              :class="['ma-4', selectedClass]"
              color="grey-lighten-1"
              height="200"
              width="200"
              @click="toggle"
            >
              <div class="d-flex fill-height align-center justify-center">
                <v-scale-transition>
<!--                  <v-icon-->
<!--                    v-if="isSelected"-->
<!--                    color="white"-->
<!--                    icon="mdi-close-circle-outline"-->
<!--                    size="48"-->
<!--                  ></v-icon>-->
                  <v-img
                    class="bg-white"
                    :src="n"
                    cover
                  ></v-img>
                </v-scale-transition>
              </div>
            </v-card>
          </v-slide-group-item>
        </v-slide-group>

        <v-expand-transition>
          <v-sheet
            v-if="model != null"
          >
            <div class="d-flex fill-height align-center justify-center">
              <h3 class="text-h6">
                <v-btn block rounded="lg" size="x-large" @click="jump" class="bg-[#f0d7b0] text-[#181410] shadow-md animate__animated animate__heartBeat animate__slow animate__infinite">立即领取</v-btn>
                <div class="ma-4 mt-4 transition duration-700 ease-in-out bg-white animate__animated animate__flipInX">
                  <v-img
                    class="hvr-buzz-out "
                    width="300"
                    :aspect-ratio="1"
                    src="https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/gzh.png"
                    cover
                  ></v-img>
                  <div class="text-subtitle-2 text-center text-red-600 shadow-md">关注公众号领取</div>
                </div>
              </h3>
            </div>
          </v-sheet>
        </v-expand-transition>
      </v-sheet>
    </v-parallax>

</template>

<script setup>
import {ref} from "vue";
import router from "@/router";
import "animate.css"

const model = ref(0);

const item = ref("https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/hb-bg.jpg");
const slides = ref([
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (1).gif",
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (1).webp",
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (10).webp",
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (11).webp",
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (12).webp",
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (13).webp",
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (14).webp",
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (15).webp",
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (2).webp",
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (3).webp",
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (4).webp",
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (5).webp",
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (6).webp",
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (7).webp",
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (8).webp",
  "https://mp-8c7af044-ed93-4e51-8002-57f4dfe74f1e.cdn.bspapp.com/1 (9).webp"
]);


function jump() {
  window.open("https://k.youshop10.com/yteTPg09")
}

</script>

<style lang="sass" scoped>
@import url("hover.css")
</style>

